//
//  CheckViewController.m
//  QSBK
//
//  Created by Eric Wang on 4/23/15.
//  Copyright (c) 2015 Eric Wang. All rights reserved.
//
#import "Common.h"
#import "CheckViewController.h"
#import "CheckBottomBar.h"
@interface CheckViewController ()
- (IBAction)back:(id)sender;
@property(nonatomic,strong)CheckBottomBar *bottomBar;
@property(nonatomic,strong)UIScrollView *contentView;
@property(nonatomic,strong)UIImageView *imageView;
@end

@implementation CheckViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self addAllSubview];
}


-(void)addAllSubview
{
    self.bottomBar = [[CheckBottomBar alloc]initWithFrame:CGRectMake(0, ScreenH-40, ScreenW, 40)];
    self.bottomBar.hidden = YES;
    [self.view addSubview:self.bottomBar];
    
    
    self.contentView = [[UIScrollView alloc]initWithFrame:CGRectMake(10, 70, ScreenW-20, ScreenH-120)];
    [self.view addSubview:self.contentView];
    self.imageView = [[UIImageView alloc]init];
    
    UIImage *image = [UIImage imageNamed:@"review_rules_content.png"];
    CGFloat scale = self.contentView.frame.size.width/image.size.width;
    
    self.imageView.frame = CGRectMake(0, 0, image.size.width*scale, image.size.height*scale);
    self.imageView.image = image;
    if(self.imageView.frame.size.height>self.contentView.frame.size.height)
    {
        self.contentView.contentSize = CGSizeMake(self.contentView.frame.size.width, self.imageView.frame.size.height);
    }
    [self.contentView addSubview:self.imageView];
    
}

- (IBAction)back:(id)sender {
    
    [self dismissViewControllerAnimated:YES completion:nil];
}
@end
